// 导入baseService
import { fetch, apiFormat2 } from '@/service/baseService';
// 地址查询
const getGaoDeCityApi = 'http://restapi.amap.com/v3/config/district?parameters';                 // 高德城市api
const getGaoDeCitySelectApi = 'http://restapi.amap.com/v3/config/district';                 // 高德城市api搜索查询-名称
const getCurrentGpsDetailApi = '/api/car-center/current/gpsDetail';                 // 当前车辆-详情
const getCurrentGpsApi = '/api/car-center/current/gps';                 // 当前车辆
const getAreaApi = '/api/car-center/area';                 // 城市api
const getLabelsApi = '/api/car-center/label';                 // 围栏列表 标记列表 是否是围篱（1：表示是;0表示不是）
const getCarStatusApi = '/api/car-center/current/statistics/status';                 // 车辆api
/**
 * 获取位置信息
 * @param fnSuccess 成功回掉
 * @param fnFail    失败回掉
 * @return void
 */
export default {
  getGaoDeCity: (opt) => fetch.get(apiFormat2(getGaoDeCityApi, opt)),
  getGaoDeSelectCity: (opt) => fetch.get(apiFormat2(getGaoDeCitySelectApi, opt)),
  getCurrentGps: () => fetch.get(apiFormat2(getCurrentGpsApi)),
  getCurrentGpsDetail: (opt) => fetch.post(getCurrentGpsDetailApi, opt),
  getArea: (opt) => fetch.get(apiFormat2(getAreaApi, opt)),
  getLabels: (opt) => fetch.get(apiFormat2(getLabelsApi, opt)),
  getCarsStatus: (opt) => fetch.get(apiFormat2(getCarStatusApi, opt))
};
